<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width,initial-scale=1.0">
    <title>我的证书</title>
    <link rel="stylesheet" href="/css/reset.css">
    <link rel="stylesheet" href="/css/mine_book.css">
    <script src="/js/base.js"></script>
    <script src="/js/html2canvas.min.js"></script>
  </head>
  <body>
    <div class="mine_book">
      <div class="wrap">
        <div class="logo"><img src="/assets/mine_book_logo.png" width="100%"></div>
        <div class="title"><img src="/assets/mine_book_title.png" width="100%"></div>
        <div class="detail">
          <div class="user_name">尊敬的<span>王系</span> ：</div>
          <div class="user_txt">
            <span>恭喜你成功完成</span>
            <span class="class">中凌全膜护高级技</span>
          </div>
          <div class="user_txt">
            <span class="class" style="margin-left: 0;">术研修班</span>
            <span>课程，成绩优异！</span>
          </div>
          <div class="dean">院长：王霜</div>
          <div class="time">2020-01-01</div>
        </div>
        <div class="line"><img src="/assets/mine_book_line.png" width="100%"></div>
        <p class="mark">企心共铸  精英未来</p>
        <p class="school">中凌膜法学院</p>
      </div>
    </div>
    <script>
      window.onload = function (params) {
        html2canvas(document.querySelector('.wrap')).then(function(canvas) {
          document.querySelector('.wrap').style.display = 'none'
          var image = new Image();  
          image.src = canvas.toDataURL("image/png");
          image.style.width = '100%'
          document.querySelector('.mine_book').appendChild(image)
        });
      }
    </script>
  </body>
</html>
